<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>data.js tests</title>
  <link rel="stylesheet" href="libs/qunit-2.1.1.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
  <!-- value -->
  <div class="test-value">
    <input data-name="user.name" type="text" value="xiaoqiang" />
    <select data-name="user.sex">
      <option value="">--请选择--</option>
      <option value="male" selected="selected">男</option>
      <option value="female">女</option>
    </select>
    <textarea data-name="remark" type="text">...</textarea>
  </div>
  
  <!-- getValues -->
  <div class="test-getValues">
    <input data-name="user.name" type="text" value="xiaoqiang" />
    <select data-name="user.sex">
      <option value="">--请选择--</option>
      <option value="male" selected="selected">男</option>
      <option value="female">女</option>
    </select>
    <textarea data-name="remark" type="text"></textarea>
  </div>
  
  <!-- setValues -->
  <div class="test-setValues">
    <input data-name="user.name" type="text" value="" />
    <select data-name="user.sex">
      <option value="">--请选择--</option>
      <option value="male">男</option>
      <option value="female">女</option>
    </select>
    <textarea data-name="remark" type="text"></textarea>
  </div>
  
  <!-- getValue -->
  <div class="test-getValue">
    <input data-name="input1" value="abcdefg" />
    <input data-name="input2" data-type="inverse" value="abcdefg" />
  </div>
  
  <!-- setValue -->
  <div class="test-setValue">
    <input data-name="input1" value="" />
    <input data-name="input2" data-type="inverse" value="" />
  </div>
  
  <!-- doGetValue -->
  <div class="test-doGetValue">
    <div data-name="div1">dfjao</div>
    <div data-name="div2"></div>
    <span data-name="span1">xdfs</span>
    <span data-name="span2"></span>
    <p data-name="p1">dsfasfsdf</p>
    <p data-name="p2"></p>
    
    <textarea data-name="textarea1">sfj</textarea>
    <textarea data-name="textarea2"></textarea>
    <input data-name="input11" type="text" value="isa" />
    <input data-name="input12" type="text" />
    <input data-name="input21" type="password" value="isa" />
    <input data-name="input22" type="password" />
    <input data-name="input31" type="hidden" value="isa" />
    <input data-name="input32" type="hidden" />
    <input data-name="button11" type="submit" value='jsj' />
    <input data-name="button12" type="submit" value='' />
    <input data-name="button21" type="button" value='vmoa' />
    <input data-name="button22" type="button" value='' />
    <button data-name="button31">sdfa</button>
    <button data-name="button32"></button>
    
    <select data-name="select1">
      <option value="a">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="multi-select1" multiple="multiple">
      <option value="a" selected="selected">A</option>
      <option value="b">B</option>
      <option value="c" selected="selected">C</option>
    </select>
    
    <input data-name="radio1" type="radio" value="sfasdf" />
    <input data-name="radio2" type="radio" value="sfasdf" checked="checked" />
    <input data-name="checkbox1" type="checkbox" value="sfasdf" />
    <input data-name="checkbox2" type="checkbox" value="sfasdf" checked="checked" />
  </div>
  
  <!-- doSetValue -->
  <div class="test-doSetValue">
    <div data-name="div1">sdfa</div>
    <span data-name="span1">sdfa</span>
    <p data-name="p1">sdfa</p>
    
    <textarea data-name="textarea1">xfsdfa</textarea>
    <input data-name="input11" type="text" value="isa" />
    <input data-name="input21" type="password" value="isa" />
    <input data-name="input31" type="hidden" value="isa" />
    <input data-name="button11" type="submit" value='isa' />
    <input data-name="button21" type="button" value='isa' />
    
    <button data-name="button31">isa</button>
    
    <select data-name="select1">
      <option value="a">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>

    <select data-name="multi-select1" multiple="multiple">
      <option value="a" selected="selected">A</option>
      <option value="b">B</option>
      <option value="c" selected="selected">C</option>
    </select>
    
    <input data-name="radio1" type="radio" value="csaxa" />
    <input data-name="radio2" type="radio" value="csaxa" checked="checked" />
    <input data-name="checkbox1" type="checkbox" value="csaxa" />
    <input data-name="checkbox2" type="checkbox" value="csaxa" checked="checked" />
  </div>
  
  <!-- getSelectedOption -->
  <div class="test-getSelectedOption">
    <select data-name="select1">
      <option value="a">A</option>
      <option value="b">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="select2">
      <option value="a">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="select3">
    </select>
    
    <select data-name="multi-select1" multiple="multiple">
      <option value="a">A</option>
      <option value="b">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="multi-select2" multiple="multiple">
      <option value="a">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="multi-select3" multiple="multiple">
      <option value="a" selected="selected">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="multi-select4" multiple="multiple">
    </select>
  </div>
  
  <!-- setSelectedOption -->
  <div class="test-setSelectedOption">
    <select data-name="select1">
      <option value="a">A</option>
      <option value="b">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="select2">
      <option value="a">A</option>
      <option value="b" selected="selected">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="select3">
    </select>
    
    <select data-name="select4">
      <option value="1">A</option>
      <option value="2" selected="selected">B</option>
      <option value="3">C</option>
    </select>
    
    
    <select data-name="multi-select1" multiple="multiple">
      <option value="a">A</option>
      <option value="b">B</option>
      <option value="c">C</option>
    </select>
    
    <select data-name="multi-select2" multiple="multiple">
      <option value="a" selected="selected">A</option>
      <option value="b">B</option>
      <option value="c" selected="selected">C</option>
    </select>
    
    <select data-name="multi-select3" multiple="multiple">
    </select>
  </div>
  
  <!-- getFirstElementByExpression -->
  <div class="test-getFirstElementByExpression">
    <input data-name="user.name" type="text" />
    <input data-name="user.age" type="text" />
    <select data-name="user.sex">
      <option value="">--请选择--</option>
      <option value="male">男</option>
      <option value="female">女</option>
    </select>
    <textarea data-name="remark" type="text"></textarea>
  </div>
  
  <!-- getAllElementByExpression -->
  <div class="test-getAllElementsByExpression">
    <input data-name="user.name" type="text" />
    <input data-name="user.age" type="text" />
    <select data-name="user.sex">
      <option value="">--请选择--</option>
      <option value="male">男</option>
      <option value="female">女</option>
    </select>
    <textarea data-name="remark" type="text"></textarea>
  </div>
</div>
<!--<script src="libs/jquery-1.12.4.js"></script>-->
<script src="libs/qunit-2.1.1.js"></script>
<script src="../data.js"></script>
<script src="data.test.js"></script>
</body>
</html>